use cosmwasm_std::{HumanAddr, Uint128};
use schemars::JsonSchema;
use serde::{Deserialize, Serialize};

use crate::state::ConfigInfo;

#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, JsonSchema)]
#[serde(rename_all = "snake_case")]
pub struct InstantiateMsg {
    pub owner: HumanAddr,
    pub exec_bot: HumanAddr,
    pub usdt_token_address: HumanAddr,
    pub usdt_token_code_hash: String,
    pub swaper_address: HumanAddr,
    pub swaper_code_hash: String,
    pub bridge_fee: u64,
    pub min_bridge_fee: Uint128,
    pub per_tx_limit: Uint128,
    pub daily_tx_limit: Uint128,
}

#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, JsonSchema)]
#[serde(rename_all = "snake_case")]
pub enum ExecuteMsg {
    UpdateConfig {
        config: ConfigInfo,
    },
    ExecuteTask {
        recipient: HumanAddr,
        swap_gas_fee: Uint128,
        amount_out: Uint128,
    },
    Withdraw {
        amount: Uint128,
    },
}

#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, Eq, JsonSchema)]
#[serde(rename_all = "snake_case")]
pub enum QueryMsg {
    Config {},
}
